Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

OIDC: Persist details in session storage, create store #11302

Merged
merged 8 commits into from
Jul 20, 2023

Conversation

kerryarchibald
Copy link
Contributor

@kerryarchibald kerryarchibald commented Jul 20, 2023

Fixes element-hq/element-web#25710

To revoke tokens from authentication server on logout we need:

  • to know that the user has authenticated via OIDC
  • oidc client id, as dynamically registered during login or from static config
  • metadata information from the OIDC issuer (we can get this via discovery)

This PR:

  • persists clientId and token issuer in session storage after successfully authenticating via OIDC native flow
  • adds OidcClientStore to SdkContext

Checklist

  • Tests written for new code (and old code if feasible)
  • Linter and other CI checks pass
  • Sign-off given on the changes (see CONTRIBUTING.md)

Here's what your changelog entry will look like:

✨ Features

@kerryarchibald kerryarchibald added the T-Enhancement New features, changes in functionality, performance boosts, user-facing improvements label Jul 20, 2023
Copy link
Contributor

@andybalaam andybalaam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks!

@kerryarchibald kerryarchibald added this pull request to the merge queue Jul 20, 2023
Merged via the queue into develop with commit 0b0d77c Jul 20, 2023
@kerryarchibald kerryarchibald deleted the kerry/25710/oidc-client-store branch July 20, 2023 21:56
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Aug 25, 2023
Changes in [1.11.39](https://github.com/vector-im/element-web/releases/tag/v1.11.39) (2023-08-15)
=================================================================================================

## 🦖 Deprecations
 * Deprecate camelCase config options ([\#25800](element-hq/element-web#25800)).
 * Deprecate customisations in favour of Module API ([\#25736](element-hq/element-web#25736)). Fixes #25733.

## ✨ Features
 * Update labs.md for knock rooms ([\#25923](element-hq/element-web#25923)). Contributed by @charlynguyen.
 * Package release builds of element-web in package.element.io debs ([\#25198](element-hq/element-web#25198)).
 * Allow knocking rooms ([\#11353](matrix-org/matrix-react-sdk#11353)). Contributed by @charlynguyen.
 * Support adding space-restricted joins on rooms not members of those spaces ([\#9017](matrix-org/matrix-react-sdk#9017)). Fixes #19213.
 * Clear requiresClient and show pop-out if widget-api fails to ready ([\#11321](matrix-org/matrix-react-sdk#11321)). Fixes vector-im/customer-retainer#73.
 * Bump pagination sizes due to hidden events ([\#11342](matrix-org/matrix-react-sdk#11342)).
 * Remove display of key backup signatures from backup settings ([\#11333](matrix-org/matrix-react-sdk#11333)).
 * Use PassphraseFields in ExportE2eKeysDialog to enforce minimum passphrase complexity ([\#11222](matrix-org/matrix-react-sdk#11222)). Fixes #9478.

## 🐛 Bug Fixes
 * Fix "Export chat" not respecting configured time format in plain text mode ([\#10696](matrix-org/matrix-react-sdk#10696)). Fixes #23838. Contributed by @rashmitpankhania.
 * Fix some missing 1-count pluralisations around event list summaries ([\#11371](matrix-org/matrix-react-sdk#11371)). Fixes #25925.
 * Fix create subspace dialog not working for public space creation ([\#11367](matrix-org/matrix-react-sdk#11367)). Fixes #25916.
 * Search for users on paste ([\#11304](matrix-org/matrix-react-sdk#11304)). Fixes #17523. Contributed by @peterscheu-aceart.
 * Fix AppTile context menu not always showing up when it has options ([\#11358](matrix-org/matrix-react-sdk#11358)). Fixes #25914.
 * Fix clicking on home all rooms space notification not working ([\#11337](matrix-org/matrix-react-sdk#11337)). Fixes #22844.
 * Fix joining a suggested room switching space away ([\#11347](matrix-org/matrix-react-sdk#11347)). Fixes #25838.
 * Fix home/all rooms context menu in space panel ([\#11350](matrix-org/matrix-react-sdk#11350)). Fixes #25896.
 * Make keyboard handling in and out of autocomplete completions consistent ([\#11344](matrix-org/matrix-react-sdk#11344)). Fixes #25878.
 * De-duplicate reactions by sender to account for faulty/malicious servers ([\#11340](matrix-org/matrix-react-sdk#11340)). Fixes #25872.
 * Fix disable_3pid_login being ignored for the email field ([\#11335](matrix-org/matrix-react-sdk#11335)). Fixes #25863.
 * Upgrade wysiwyg editor for ctrl+backspace windows fix ([\#11324](matrix-org/matrix-react-sdk#11324)). Fixes vector-im/verticals-internal#102.
 * Unhide the view source event toggle - it works well enough ([\#11336](matrix-org/matrix-react-sdk#11336)). Fixes #25861.

Changes in [1.11.38](https://github.com/vector-im/element-web/releases/tag/v1.11.38) (2023-08-04)
=================================================================================================

## ✨ Features
 * Package release builds of element-web in package.element.io debs ([\#25198](element-hq/element-web#25198)).

## 🐛 Bug Fixes
 * Revert to using the /presence API for presence ([\#11366](matrix-org/matrix-react-sdk#11366))

Changes in [1.11.37](https://github.com/vector-im/element-web/releases/tag/v1.11.37) (2023-08-01)
=================================================================================================

## 🦖 Deprecations
 * Deprecate camelCase config options ([\#25800](element-hq/element-web#25800)).
 * Deprecate customisations in favour of Module API ([\#25736](element-hq/element-web#25736)). Fixes #25733.

## ✨ Features
 * Do not show "Forget room" button in Room View header for guest users ([\#10898](matrix-org/matrix-react-sdk#10898)). Contributed by @spantaleev.
 * Switch to updating presence via /sync calls instead of PUT /presence ([\#11223](matrix-org/matrix-react-sdk#11223)). Fixes #20809 #13877 and #4813.
 * Fix blockquote colour contrast ([\#11299](matrix-org/matrix-react-sdk#11299)). Fixes matrix-org/element-web-rageshakes#21800.
 * Don't hide room header buttons in video rooms and rooms with a call ([\#9712](matrix-org/matrix-react-sdk#9712)). Fixes #23900.
 * OIDC: Persist details in session storage, create store ([\#11302](matrix-org/matrix-react-sdk#11302)). Fixes #25710. Contributed by @kerryarchibald.
 * Allow setting room join rule to knock ([\#11248](matrix-org/matrix-react-sdk#11248)). Contributed by @charlynguyen.
 * Retry joins on 524 (Cloudflare timeout) also ([\#11296](matrix-org/matrix-react-sdk#11296)). Fixes #8776.
 * Make sure users returned by the homeserver search API are displayed. Don't silently drop any. ([\#9556](matrix-org/matrix-react-sdk#9556)). Fixes #24422. Contributed by @maxmalek.
 * Offer to unban user during invite if inviter has sufficient permissions ([\#11256](matrix-org/matrix-react-sdk#11256)). Fixes #3222.
 * Split join and goto slash commands, the latter shouldn't auto_join ([\#11259](matrix-org/matrix-react-sdk#11259)). Fixes #10128.
 * Integration work for rich text editor 2.3.1 ([\#11172](matrix-org/matrix-react-sdk#11172)). Contributed by @alunturner.
 * Compound color pass ([\#11079](matrix-org/matrix-react-sdk#11079)). Fixes vector-im/internal-planning#450 and #25547.
 * Warn when demoting self via /op and /deop slash commands ([\#11214](matrix-org/matrix-react-sdk#11214)). Fixes #13726.

## 🐛 Bug Fixes
 * Correct Jitsi preferred_domain property ([\#25813](element-hq/element-web#25813)). Contributed by @benbz.
 * Fix edge case with sent indicator being drawn when it shouldn't be ([\#11320](matrix-org/matrix-react-sdk#11320)).
 * Use correct translation function for WYSIWYG buttons ([\#11315](matrix-org/matrix-react-sdk#11315)). Fixes vector-im/verticals-internal#109.
 * Handle empty own profile ([\#11319](matrix-org/matrix-react-sdk#11319)). Fixes #25510.
 * Fix peeked rooms showing up in historical ([\#11316](matrix-org/matrix-react-sdk#11316)). Fixes #22473.
 * Ensure consistency when rendering the sent event indicator ([\#11314](matrix-org/matrix-react-sdk#11314)). Fixes #17937.
 * Prevent re-filtering user directory results in spotlight ([\#11290](matrix-org/matrix-react-sdk#11290)). Fixes #24422.
 * Fix GIF label on dark theme ([\#11312](matrix-org/matrix-react-sdk#11312)). Fixes #25836.
 * Fix issues around room notification settings flaking out ([\#11306](matrix-org/matrix-react-sdk#11306)). Fixes #16472 #21309 and #6828.
 * Fix invite dialog showing the same user multiple times ([\#11308](matrix-org/matrix-react-sdk#11308)). Fixes #25578.
 * Don't show composer send button if user cannot send ([\#11298](matrix-org/matrix-react-sdk#11298)). Fixes #25825.
 * Restore color for sender in imageview ([\#11289](matrix-org/matrix-react-sdk#11289)). Fixes #25822.
 * Fix changelog dialog heading size ([\#11286](matrix-org/matrix-react-sdk#11286)). Fixes #25789.
 * Restore offline presence badge color ([\#11287](matrix-org/matrix-react-sdk#11287)). Fixes #25792.
 * Fix bubble message layout avatar overlap ([\#11284](matrix-org/matrix-react-sdk#11284)). Fixes #25818.
 * Fix voice call tile size ([\#11285](matrix-org/matrix-react-sdk#11285)). Fixes #25684.
 * Fix layout of sessions tab buttons ([\#11279](matrix-org/matrix-react-sdk#11279)). Fixes #25545.
 * Don't bother showing redundant tooltip on space menu ([\#11276](matrix-org/matrix-react-sdk#11276)). Fixes #20380.
 * Remove reply fallback from notifications ([\#11278](matrix-org/matrix-react-sdk#11278)). Fixes #17859.
 * Populate info.duration for audio & video file uploads ([\#11225](matrix-org/matrix-react-sdk#11225)). Fixes #17720.
 * Hide widget menu button if it there are no options available ([\#11257](matrix-org/matrix-react-sdk#11257)). Fixes #24826.
 * Fix colour regressions ([\#11273](matrix-org/matrix-react-sdk#11273)). Fixes #25788, #25808 #25811 and #25812.
 * Fix room view not properly maintaining scroll position ([\#11274](matrix-org/matrix-react-sdk#11274)). Fixes #25810.
 * Prevent user from accidentally double clicking user info admin actions ([\#11254](matrix-org/matrix-react-sdk#11254)). Fixes #10944.
 * Fix missing metaspace notification badges ([\#11269](matrix-org/matrix-react-sdk#11269)). Fixes #25679.
 * Fix clicking MXID in timeline going to matrix.to ([\#11263](matrix-org/matrix-react-sdk#11263)). Fixes #23342.
 * Restoring optional ligatures by resetting letter-spacing ([\#11202](matrix-org/matrix-react-sdk#11202)). Fixes #25727.
 * Allow emoji presentation selector to not break BigEmoji styling ([\#11253](matrix-org/matrix-react-sdk#11253)). Fixes #17848.
 * Make event highliht use primary content token ([\#11255](matrix-org/matrix-react-sdk#11255)).
 * Fix event info events size and color ([\#11252](matrix-org/matrix-react-sdk#11252)). Fixes #25778.
 * Fix color mapping for blockquote border ([\#11251](matrix-org/matrix-react-sdk#11251)). Fixes #25782.
 * Strip emoji variation when searching emoji by emoji ([\#11221](matrix-org/matrix-react-sdk#11221)). Fixes #18703.
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Aug 31, 2023
Changes in [1.11.39](https://github.com/vector-im/element-web/releases/tag/v1.11.39) (2023-08-15)
=================================================================================================

## 🦖 Deprecations
 * Deprecate camelCase config options ([\#25800](element-hq/element-web#25800)).
 * Deprecate customisations in favour of Module API ([\#25736](element-hq/element-web#25736)). Fixes #25733.

## ✨ Features
 * Update labs.md for knock rooms ([\#25923](element-hq/element-web#25923)). Contributed by @charlynguyen.
 * Package release builds of element-web in package.element.io debs ([\#25198](element-hq/element-web#25198)).
 * Allow knocking rooms ([\#11353](matrix-org/matrix-react-sdk#11353)). Contributed by @charlynguyen.
 * Support adding space-restricted joins on rooms not members of those spaces ([\#9017](matrix-org/matrix-react-sdk#9017)). Fixes #19213.
 * Clear requiresClient and show pop-out if widget-api fails to ready ([\#11321](matrix-org/matrix-react-sdk#11321)). Fixes vector-im/customer-retainer#73.
 * Bump pagination sizes due to hidden events ([\#11342](matrix-org/matrix-react-sdk#11342)).
 * Remove display of key backup signatures from backup settings ([\#11333](matrix-org/matrix-react-sdk#11333)).
 * Use PassphraseFields in ExportE2eKeysDialog to enforce minimum passphrase complexity ([\#11222](matrix-org/matrix-react-sdk#11222)). Fixes #9478.

## 🐛 Bug Fixes
 * Fix "Export chat" not respecting configured time format in plain text mode ([\#10696](matrix-org/matrix-react-sdk#10696)). Fixes #23838. Contributed by @rashmitpankhania.
 * Fix some missing 1-count pluralisations around event list summaries ([\#11371](matrix-org/matrix-react-sdk#11371)). Fixes #25925.
 * Fix create subspace dialog not working for public space creation ([\#11367](matrix-org/matrix-react-sdk#11367)). Fixes #25916.
 * Search for users on paste ([\#11304](matrix-org/matrix-react-sdk#11304)). Fixes #17523. Contributed by @peterscheu-aceart.
 * Fix AppTile context menu not always showing up when it has options ([\#11358](matrix-org/matrix-react-sdk#11358)). Fixes #25914.
 * Fix clicking on home all rooms space notification not working ([\#11337](matrix-org/matrix-react-sdk#11337)). Fixes #22844.
 * Fix joining a suggested room switching space away ([\#11347](matrix-org/matrix-react-sdk#11347)). Fixes #25838.
 * Fix home/all rooms context menu in space panel ([\#11350](matrix-org/matrix-react-sdk#11350)). Fixes #25896.
 * Make keyboard handling in and out of autocomplete completions consistent ([\#11344](matrix-org/matrix-react-sdk#11344)). Fixes #25878.
 * De-duplicate reactions by sender to account for faulty/malicious servers ([\#11340](matrix-org/matrix-react-sdk#11340)). Fixes #25872.
 * Fix disable_3pid_login being ignored for the email field ([\#11335](matrix-org/matrix-react-sdk#11335)). Fixes #25863.
 * Upgrade wysiwyg editor for ctrl+backspace windows fix ([\#11324](matrix-org/matrix-react-sdk#11324)). Fixes vector-im/verticals-internal#102.
 * Unhide the view source event toggle - it works well enough ([\#11336](matrix-org/matrix-react-sdk#11336)). Fixes #25861.

Changes in [1.11.38](https://github.com/vector-im/element-web/releases/tag/v1.11.38) (2023-08-04)
=================================================================================================

## ✨ Features
 * Package release builds of element-web in package.element.io debs ([\#25198](element-hq/element-web#25198)).

## 🐛 Bug Fixes
 * Revert to using the /presence API for presence ([\#11366](matrix-org/matrix-react-sdk#11366))

Changes in [1.11.37](https://github.com/vector-im/element-web/releases/tag/v1.11.37) (2023-08-01)
=================================================================================================

## 🦖 Deprecations
 * Deprecate camelCase config options ([\#25800](element-hq/element-web#25800)).
 * Deprecate customisations in favour of Module API ([\#25736](element-hq/element-web#25736)). Fixes #25733.

## ✨ Features
 * Do not show "Forget room" button in Room View header for guest users ([\#10898](matrix-org/matrix-react-sdk#10898)). Contributed by @spantaleev.
 * Switch to updating presence via /sync calls instead of PUT /presence ([\#11223](matrix-org/matrix-react-sdk#11223)). Fixes #20809 #13877 and #4813.
 * Fix blockquote colour contrast ([\#11299](matrix-org/matrix-react-sdk#11299)). Fixes matrix-org/element-web-rageshakes#21800.
 * Don't hide room header buttons in video rooms and rooms with a call ([\#9712](matrix-org/matrix-react-sdk#9712)). Fixes #23900.
 * OIDC: Persist details in session storage, create store ([\#11302](matrix-org/matrix-react-sdk#11302)). Fixes #25710. Contributed by @kerryarchibald.
 * Allow setting room join rule to knock ([\#11248](matrix-org/matrix-react-sdk#11248)). Contributed by @charlynguyen.
 * Retry joins on 524 (Cloudflare timeout) also ([\#11296](matrix-org/matrix-react-sdk#11296)). Fixes #8776.
 * Make sure users returned by the homeserver search API are displayed. Don't silently drop any. ([\#9556](matrix-org/matrix-react-sdk#9556)). Fixes #24422. Contributed by @maxmalek.
 * Offer to unban user during invite if inviter has sufficient permissions ([\#11256](matrix-org/matrix-react-sdk#11256)). Fixes #3222.
 * Split join and goto slash commands, the latter shouldn't auto_join ([\#11259](matrix-org/matrix-react-sdk#11259)). Fixes #10128.
 * Integration work for rich text editor 2.3.1 ([\#11172](matrix-org/matrix-react-sdk#11172)). Contributed by @alunturner.
 * Compound color pass ([\#11079](matrix-org/matrix-react-sdk#11079)). Fixes vector-im/internal-planning#450 and #25547.
 * Warn when demoting self via /op and /deop slash commands ([\#11214](matrix-org/matrix-react-sdk#11214)). Fixes #13726.

## 🐛 Bug Fixes
 * Correct Jitsi preferred_domain property ([\#25813](element-hq/element-web#25813)). Contributed by @benbz.
 * Fix edge case with sent indicator being drawn when it shouldn't be ([\#11320](matrix-org/matrix-react-sdk#11320)).
 * Use correct translation function for WYSIWYG buttons ([\#11315](matrix-org/matrix-react-sdk#11315)). Fixes vector-im/verticals-internal#109.
 * Handle empty own profile ([\#11319](matrix-org/matrix-react-sdk#11319)). Fixes #25510.
 * Fix peeked rooms showing up in historical ([\#11316](matrix-org/matrix-react-sdk#11316)). Fixes #22473.
 * Ensure consistency when rendering the sent event indicator ([\#11314](matrix-org/matrix-react-sdk#11314)). Fixes #17937.
 * Prevent re-filtering user directory results in spotlight ([\#11290](matrix-org/matrix-react-sdk#11290)). Fixes #24422.
 * Fix GIF label on dark theme ([\#11312](matrix-org/matrix-react-sdk#11312)). Fixes #25836.
 * Fix issues around room notification settings flaking out ([\#11306](matrix-org/matrix-react-sdk#11306)). Fixes #16472 #21309 and #6828.
 * Fix invite dialog showing the same user multiple times ([\#11308](matrix-org/matrix-react-sdk#11308)). Fixes #25578.
 * Don't show composer send button if user cannot send ([\#11298](matrix-org/matrix-react-sdk#11298)). Fixes #25825.
 * Restore color for sender in imageview ([\#11289](matrix-org/matrix-react-sdk#11289)). Fixes #25822.
 * Fix changelog dialog heading size ([\#11286](matrix-org/matrix-react-sdk#11286)). Fixes #25789.
 * Restore offline presence badge color ([\#11287](matrix-org/matrix-react-sdk#11287)). Fixes #25792.
 * Fix bubble message layout avatar overlap ([\#11284](matrix-org/matrix-react-sdk#11284)). Fixes #25818.
 * Fix voice call tile size ([\#11285](matrix-org/matrix-react-sdk#11285)). Fixes #25684.
 * Fix layout of sessions tab buttons ([\#11279](matrix-org/matrix-react-sdk#11279)). Fixes #25545.
 * Don't bother showing redundant tooltip on space menu ([\#11276](matrix-org/matrix-react-sdk#11276)). Fixes #20380.
 * Remove reply fallback from notifications ([\#11278](matrix-org/matrix-react-sdk#11278)). Fixes #17859.
 * Populate info.duration for audio & video file uploads ([\#11225](matrix-org/matrix-react-sdk#11225)). Fixes #17720.
 * Hide widget menu button if it there are no options available ([\#11257](matrix-org/matrix-react-sdk#11257)). Fixes #24826.
 * Fix colour regressions ([\#11273](matrix-org/matrix-react-sdk#11273)). Fixes #25788, #25808 #25811 and #25812.
 * Fix room view not properly maintaining scroll position ([\#11274](matrix-org/matrix-react-sdk#11274)). Fixes #25810.
 * Prevent user from accidentally double clicking user info admin actions ([\#11254](matrix-org/matrix-react-sdk#11254)). Fixes #10944.
 * Fix missing metaspace notification badges ([\#11269](matrix-org/matrix-react-sdk#11269)). Fixes #25679.
 * Fix clicking MXID in timeline going to matrix.to ([\#11263](matrix-org/matrix-react-sdk#11263)). Fixes #23342.
 * Restoring optional ligatures by resetting letter-spacing ([\#11202](matrix-org/matrix-react-sdk#11202)). Fixes #25727.
 * Allow emoji presentation selector to not break BigEmoji styling ([\#11253](matrix-org/matrix-react-sdk#11253)). Fixes #17848.
 * Make event highliht use primary content token ([\#11255](matrix-org/matrix-react-sdk#11255)).
 * Fix event info events size and color ([\#11252](matrix-org/matrix-react-sdk#11252)). Fixes #25778.
 * Fix color mapping for blockquote border ([\#11251](matrix-org/matrix-react-sdk#11251)). Fixes #25782.
 * Strip emoji variation when searching emoji by emoji ([\#11221](matrix-org/matrix-react-sdk#11221)). Fixes #18703.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
T-Enhancement New features, changes in functionality, performance boosts, user-facing improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OIDC: Store OIDC client settings during session
2 participants